import { LibEntity } from '@/lib/entity/libEntity';
import { IsString } from 'class-validator';
import { Entity, Column, DeleteDateColumn } from 'typeorm';
@Entity('t_common_file') //生成的表名
export class FileEntity extends LibEntity {
  @IsString()
  @Column({ type: 'varchar', length: 255, nullable: false })
  url: string;
  /**
   * original_name: 上传上来的名称
   */
  @IsString()
  @Column({ type: 'varchar', length: 255 })
  original_name: string;
  /**
   * 特殊列：文件删除时间。
   */
  @DeleteDateColumn({ type: 'datetime' })
  delete_time: Date;
}
